<p class="titlebig">Фотогаллерея</p>

<table border="0" cellpadding="0" cellspacing="0">
<tbody><tr>
	
	<?php 
	$i = 0;
foreach ($this->Galleries as $Item)
{
    $Link = $this->baseUrl ( 'gallery/index/view/id/' . $Item ['id'] );
    $i++;
?>
	<td class="photo" valign="top">
	<!-- Start of photo -->
	<table border="0" cellpadding="0" cellspacing="0">
	<tbody><tr>
		<td colspan="3"><img src="/theme/images/ph_bordtop1.jpg" height="11" width="210"></td>
	</tr>
	<tr>
		<td class="bgphbl"><img src="/theme/images/spacer.gif" height="1" width="11"></td>
		<td><a href="<?php echo $Link ?>"  ><img src="<? echo $this->baseUrl ( "images/thumb_small/" . $Item ['pictures'] [0] ['filename'] ) ?>"  ></a></td>
		<td class="bgphbr"><img src="/theme/images/spacer.gif" height="1" width="11"></td>
	</tr>
		<tr>
			<td colspan="3"><img src="/theme/images/ph_bordbot1.jpg" height="12" width="210"></td>
		</tr>
	</tbody></table>
	<a href="<?php echo $Link ?>"><?php echo $Item ['Name']?></a>
	</td>
	
	<?php 
	if ( ($i % 3) == 0 )
	{?>
	<tr>
	<td colspan="5" align="center"><img src="/theme/images/line.gif" height="55" width="548"></td>
</tr>
	<?
	}
	else
	{?>
	
	<td><img src="/theme/images/spacer.gif" height="1" width="10"></td>
	
	<?php 
	}    
	?>
	
<?php 
}


	if ( ($i % 3) !== 0 )
	{
?>
	
<tr>
	<td colspan="5" align="center"><img src="/theme/images/line.gif" height="55" width="548"></td>
</tr>
<?php 
	}
	?>
</tbody></table>
 
